Repository navigation
Conversation
|
Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12, head MEASURED
READ IN CODE
ASSUMED
AI-assisted: Claude Code |
|
Verified on Windows with the control: the suite fails when Cherry-picked onto
So the new cases are tied to the new code and not to fixtures the file already had. They add to the same suite that #2805, #2804 and #2810 touch, and all five together are consistent - I have now run every one of them. It applies on What I could not test: the PowerShell side ( AI-assisted: yes - DeepSeek v4.1 (flash), applied and ran both arms on the machine above. Written with an AI assistant. |
KelboLive
left a comment
There was a problem hiding this comment.
Tested on Windows / Python 3.12; python -I tests/test_game_gate.py is 27 tests, OK. A synthetic 8-sample run gives one row per memory line with the documented header (70.0,1000,500,15000,4000,8000,7000,500,0,0), LF only and no BOM, every column equal to the log's integer MB with no rescale, and the summary's private_max, reaper_queue_max / _at_s, waiting_objects_max, vram_in_use_max all equal the CSV maxima; the slope recomputes from the CSV (600.0 vs 600.0 on mine). A one-sample run gives one row and slope: null with no division, and a run without memory lines writes no memory.csv.
Two things before merge, both documentation-truth:
docs/game_gate.md:105still lists "A time series beside the summary (memory, census, reaping queue)" under## Not in this version, which is exactly what this PR adds;:107("VRAM and RAM peaks") is stale from #2810. No test reads that list, so CI will not catch it.summary.memory.vram_in_use_max_mbcounts every video line (tools/game_gate.py:457), including the swap-chain ones (host.rs:13100,:13485,:13607), whilememory.csvsamples only the video line nearest each memory row (:410). A verifier can see a peak insummary.jsonwith no matching row — I reproduced it (CSV cell empty, summary 7777). Document the distinction or emit the peak's sample row.
Minor: write_series (:419-423) returns before unlinking an existing memory.csv, so re-summarizing a folder whose log lost its memory lines leaves series: null beside stale rows; and the test at tests/test_game_gate.py:322-328 only asserts the summary side of "no memory lines gives no series", never that no file is written (it calls summary(), not main()). Docs also omit reaper_queue_max_at_s / waiting_objects_max from the field table and never list the CSV header.
Merge picture: this branch already contains #2810 and #2812, and every order of the three merges cleanly on 86c30fcea with identical final trees and additive summary.json keys. Landing order I would use is #2810 -> #2812 -> #2813.
|
Thanks @KelboLive. Confirmed: To keep this verified head unchanged, I will fix it in a follow-up pull request after the merge: remove the old file when there are no rows, with a test for that case. |
…ORY-STOP) A memory pile-up has taken a PC's whole Windows down, not only the device, and a fixed 80 GB cap never triggers on a PC with a 40 GB commit limit. The supervisor now asks `game_gate.py state` for a memory stop, read from the runtime's latest memory lines: the game's private bytes past -StopPrivateMB (default 90 % of this PC's commit limit), the PC under -StopCommitLeftMB left to commit for 20 s (default the larger of 128 MB and 0.25 % of the limit), or video memory over the system's budget for -StopOverBudgetSeconds (60). 0 turns one off. The run then stops the same clean way, with the reason `memory`; the limits go into run.json and the summary, the limit passed into `stop.memory_why`, and the verdict is FAIL `memory_stop`. `start` forwards the limits to the detached run.
With a large page file the commit limit is far above what a PC survives: two Windows crashes (0x10E) came at about 100 GB private on a PC with 64 GB of memory and a 175 GB limit, where 90 % of the limit is 158 GB. The default is now the lower of 90 % of the commit limit and 1.25 x the physical memory (80 GB there, 36 GB here); the video memory stop stays on by default.
…ested at 20 s (review) A run that reached -WorldSeconds at the same poll as a memory limit was reported FAIL `memory_stop`. It is a measurement, and its memory peaks are in the summary all the same, so the supervisor now checks the target first. The poll's order is one function, Get-StopReason, which the test takes out of the script and puts to PowerShell 7 with synthetic polls. The commit floor's boundary is now tested at exactly 20 s, and the docs say what `stop.memory_why` holds: the gate's whole sentence.
…full (review) A negative -StopOverBudgetSeconds stopped every run at its first video memory line: 0 s over the budget passed a negative limit. Every limit is now off at 0 or less, with a test for each, and a line at exactly the private limit is tested not to stop. The poll test gets a memory limit at the time limit (memory wins), and the script text test checks the target and time limits the loop passes and that the memory stop's sentence reaches the stop event. The docs give the poll's whole order (a STOP file and the world time at the same check give `target`), say that `world_time_short` and `world_not_reached` are not added to `memory_stop`, and name `memory.stop_limits`.
…TE-MEMORY-SERIES) Testers read a pile-up by its slope and by the reaper's queue, which the summary's peaks do not show. The parser now also reads the runtime's census line written with each memory line (objects let go that wait for their submissions, and the reaper thread's queue) and writes memory.csv beside summary.json: one row per memory line with the private bytes, the PC's memory free and left to commit, the card's video memory budget and in use, the shared memory in use and the two queues. The summary's memory block gets the reaper queue at its longest and when, the most objects waiting, and the least-squares slope of the private bytes in the world (MB a minute). The census strings join the contract test.
…view) `write_series` returned before an older memory.csv was touched, so a folder summarized again from a log without memory lines kept old rows beside `series: null`: it now removes that file. Two tests go through `main()`: no memory lines writes no file, and an older file goes. The docs list the CSV header, how its video memory and census columns are picked (the nearest line within 2 s), `reaper_queue_max_at_s` and `waiting_objects_max`, and that the summary's video memory peak counts every video memory line, the swap chain's too, so it can come from a line with no row in the CSV. "Not in this version" no longer lists the time series and the VRAM and RAM peaks. The census line's fixture is the runtime's sentence as it is now, with the reaper's bound (LEONIDA_REAPER_LIMIT) at its end; the part the parser reads did not change.
…p to the stop (review) `summary` wrote memory.csv before summary.json, so a memory.csv open in another program left no summary and exit 1. A file it cannot write or remove is now said on stderr, `series` is null and summary.json is written. The private bytes' slope counted the memory lines written while the title ends after the stop request; it now covers the world up to the stop, as the frame rates do. New tests: the 2 s window and the empty cells of memory.csv, its LF line ends, the slope with lines after the stop and with fewer than 3 lines in the world, and a memory.csv that cannot be written. The census sentence's contract is one key over the whole part WAITS reads, the ", " between its two numbers too. The docs name every video memory line the peak counts (the swap chain made, its buffers made again, a budget change of 256 MB or more) and when the slope and `series` are null.
c67a2b6 to
0e5ebd0
Compare
|
Rebased on
Also from a second review:
AI-assisted (Claude Code, Claude Fable 5.2 and Claude Opus 5.5; a separate Claude Opus 5.5 agent reviewed the diff before this push). |
Claimed in the coordination issue as: D3D12-GATE-MEMORY-SERIES (#2570 (comment))
Depends on: #2812 (this branch holds its commits and will be rebased on
mainonce it is merged)What and why
Testers read a memory pile-up by its slope and by the reaper's queue. The peaks of #2810 show neither, so they kept a sampler of their own beside each run. This is the third of the three memory PRs for the gate.
tools/game_gate.pyalso reads the runtime's census line. The runtime writes it with each memory line, every 5 s, in builds with diagnostics. It carries the objects let go that wait for their submissions, and the objects handed to the reaper thread and not let go yet: the reaper's queue.summarywritesmemory.csvbesidesummary.json, one row per memory line. Each row has: time, private bytes, those in physical memory, the PC's memory free and left to commit, the card's video memory budget and in use, the shared memory in use, and the two queues. A run without memory lines writes no file, and a folder summarized again without them loses an older one. Each row takes the video and census lines within 2 s of its memory line (empty cells when there are none). The file is LF only.memoryblock gets:series, the file's name, or null when the file could not be written (for example open in another program): the summary is written all the same.docs/game_gate.mddescribes the file, its header, how its columns are picked, the new fields, and that the summary's video memory peak counts every video memory line (the swap chain's and the budget changes' too), so it can come from a line with no CSV row.Tested
On Windows 11 Pro 10.0, rebased on
main8422def:tests/test_game_gate.py: 35 tests OK. The new ones fail with gate: a memory stop ends a run before memory runs out (D3D12-GATE-MEMORY-STOP) #2812's parser. They cover:summarywrites 76 rows with the right columns and last values;memory.csvis removed when the log has no memory lines; the summary is written whenmemory.csvcannot be; the CSV has no CR; the 2 s window and empty cells; the slope stops at the stop request.test_tool_stdout_encoding.pyandscripts/check_no_game_data.pyon the changed files are clean.GPUs tested: NVIDIA GeForce RTX 3080 10 GB, driver 32.0.16.2140
AI-assisted: yes. Claude Code (Claude Fable 5.2 and Claude Opus 5.5); a separate Claude Opus 5.5 agent reviewed the diff before this push.
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)